import myaxios from '../MyAxios'
import BASEURL from '../BaseUrl'
const { BMDURL } = BASEURL

const userApi = {
  // 用户分页查询
  list(params) {
    return myaxios.get(BMDURL + '/userlist/listfy', params)
  },

  // 删除用户
  delete(params) {
    return myaxios.post(BMDURL + '/register/delete', params)
  },
  // 用户登录
  login(params) {
    /**
     * 登录接口
     * @param {Object}} params  {user,pwd}
     */
    return myaxios.post(BMDURL + '/login', params)
  },
  // 模糊查询用户
  queryByNameLike(params) {
    return myaxios.post(BMDURL + '/register/name', params)
  },

  // 分页模糊查询
  mohu(params) {
    return myaxios.post(BMDURL + '/userlist/mohu', params)
  },
  // 新增用户
  add(params) {
    return myaxios.post(BMDURL + '/register', params)
  },

  query(params) {
    return myaxios.get(BMDURL + '/register/userid/query',params)
  },

  change(params) {
    return myaxios.post(BMDURL + '/register/change', params)
  },

  shanchu(params) {
    return myaxios.post(BMDURL + '/register/del', params)
  }
}
export default userApi
